1. Field of the Invention
The present invention relates to an automatic focus adjustment apparatus for driving a photographing lens to trace a moving object.
2. Related Background Art
As a control method for an automatic focus adjustment apparatus using a charge accumulation type image sensor (to be referred to as an AF sensor hereinafter), the present applicant previously disclosed, in U.S. Pat. No. 5,153,630, a so-called overlap servo control method for shortening a photographing lens driving (to be referred to as "servo" hereinafter) time and improving focus adjustment precision by parallelly executing charge accumulation of the AF sensor and servo. Subsequently, the present applicant proposed, in U.S. Ser. No. 894,437, now U.S. Pat. No. 5,270,763, issued Dec. 14, 1993, a so-called overlap prediction driving control method for detecting a motion of an object while executing overlap servo control to predict an object position, and driving a photographing lens to the predicted position.
FIG. 11 is a block diagram showing a camera comprising an automatic focus adjustment (to be referred to as auto-focus or simply, AF, hereinafter) apparatus for attaining servo control of a photographing lens to an in-focus state by driving the lens by a motor.
In FIG. 11, a focus detection light beam reflected by an object and transmitted through a photographing lens 1 forms an image on an AF sensor 2 such as a CCD arranged in a camera main body, and an optical image signal from the AF sensor 2 is supplied to a microcomputer (to be referred to as a CPU hereinafter) 4 for controlling the entire system via an interface 3.
An optical image pattern of the focus detection light beam projected onto the AF sensor 2 is A/D-converted by the interface 3 and a digital signal is output to the CPU 4, or is amplified to a proper level by the interface 3 and is directly A/D-converted by an internal A/D converter of the CPU 4. The CPU 4 calculates a defocus amount by processing the optical image pattern converted into the digital signal according to a predetermined algorithm, and calculates a lens driving amount for attaining an in-focus state of the photographing lens 1 on the basis of the calculated defocus amount. Since the detailed optical principle and algorithm for defocus amount detection are known to those who are skilled in the art, a detailed description thereof will be omitted.
An encoder 6 for monitoring the moving amount of the photographing lens 1 is provided to the photographing lens 1, and every time the photographing lens 1 is moved by a predetermined amount along the optical axis, the encoder 6 generates a pulse. The CPU 4 outputs the calculated lens driving amount to a driver 5 to drive a servo motor 7, thereby driving the photographing lens 1 in an in-focus direction. Furthermore, the CPU 4 counts feedback pulses from the encoder 6, and when it has counted the number of pulses corresponding to the lens driving amount, the CPU 4 stops the driving operation of the servo motor 7. Normally, the encoder 6 comprises, e.g., a photointerrupter attached to a portion of a rotational shaft or a reduction gear of the servo motor 7, and detects rotation of the servo motor 7.
Note that the defocus amount means a relative image plane deviation amount .DELTA.Z between a surface (imaging surface) where an image of a focus detection light beam transmitted through the photographing lens is formed and a prospective focal plane equivalent to a film surface, as shown in FIG. 12, and is almost equal to the lens driving amount necessary for attaining the in-focus state of the photographing lens 1. Therefore, in order to form (focus) an optical image on the film surface, the photographing lens 1 is moved backward by a defocus amount .DELTA.Z.alpha. in a near-focus state; it is moved forward by a defocus amount .DELTA.Z.beta. in a far-focus state. Although the defocus amount .DELTA.Z does not coincide with the lens driving amount in a strict sense, these amounts are assumed to be equal to each other in this specification.
An overlap prediction driving operation will be described below with reference to FIG. 13.
In FIG. 13, time t is plotted along the abscissa, and a distance Z along the optical axis is plotted along the ordinate. A curve Q in FIG. 13 corresponds to the locus of the distance Z along the optical axis between the photographing lens 1 and an object image plane defined by the photographing lens 1, and represents a state wherein the distance Z changes over time upon movement of an object. A curve L represents the locus of the distance Z along the optical axis between the photographing lens 1 and the prospective focal plane equivalent to the film surface. Therefore, with reference to the photographing lens 1, the curve Q represents the object image plane position, and the curve L represents the prospective focal plane position. A difference between the curves Q and L represents a distance between the object image plane and the prospective focal plane, i.e., a defocus amount D. Times t(n-1), t(n), and t(n+1) correspond to almost central times of charge accumulation periods of the AF sensor 2, and a period sandwiched between two vertical lines drawn up to the curve Q or L at two sides of each time is the charge accumulation time. Furthermore, defocus amounts at the times t(n-1), t(n), and t(n+1) are respectively represented by D(n-1), D(n), and D(n+1). In the following description, in figures similar to FIG. 13, the ordinate Z, the abscissa t, the curves Q and L, and the like have the same meanings. In the following description, the sensor accumulation time is shown as a time at a certain point on the time base t. However, in practice, an accumulation time is required as long as the charge accumulation type AF sensor 2 is used. In this specification, the charge accumulation time of the AF sensor 2 will be referred to as a distance measurement time.
As can be seen from FIG. 13, using a defocus amount D(n) obtained in distance measurement at the time t(n), a previous defocus amount D(n-1) obtained in distance measurement at the time t(n-1), and a driving amount M(n) of the photographing lens 1 during this interval, a moving amount P(n) of the object image plane from the time t(n-1) to the time t(n) is given by: EQU P(n)=D(n)+M(n)-D(n-1) (1)
Therefore, a moving speed S(n) of the object image plane during this interval is given by: EQU S(n)=P(n)/{t(n)-t(n-1)} (2)
However, since a difference {D(n)-D(n-1)} between the defocus amounts obtained in the two successive distance measurement operations and the moving amount M(n) of the photographing lens 1 during this interval are small, if the moving speed S(n) of the object image plane is calculated using equations (1) and (2) on the basis of these data, calculation precision of the moving speed is impaired. In order to improve the calculation precision, equations (1) and (2) are calculated on the basis of a difference {D(n)-D(n-i)} between the latest defocus amount D(n) and a previous defocus amount D(n-i), and a moving amount Mi(n) of the photographing lens 1 during this interval. More specifically, the moving amount P(n) and the moving speed S(n) of the object image plane are respectively given by: EQU P(n)=D(n)+Mi(n)-D(n-i) (3) EQU S(n)=P(n)/{t(n)-t(n-i)} (4)
where Mi(n) is the driving amount of the photographing lens 1 from the time t(n-i) to the time t(n).
For example, when the moving amount P(n) and the moving speed S(n) of the object image plane are calculated at every two distance measurement periods, as shown in FIG. 14, equations (3) and (4) are respectively rewritten as: EQU P(n)=D(n)+M2(n)-D(n-2) (5) EQU S(n)=P(n)/{t(n)-t(n-2)} (6)
When the defocus amount D(n) and the object image plane moving speed S(n) are detected, the lens driving amount for driving the photographing lens 1 to an almost in-focus position in the next charge accumulation operation can be calculated. However, U.S. Ser. No. 894,437 described above proposed that updating of a target driving amount of servo based on a defocus amount obtained in a certain distance measurement operation (to be referred to as servo refresh hereinafter) is executed after the next charge accumulation in place of a time immediately after the end of calculation of the defocus amount, i.e., immediately before the beginning of the next charge accumulation. As a result, servo control can be performed during a period (as a servo refresh time) from the end time of the next charge accumulation to the start time of the second next charge accumulation without adversely affecting charge accumulation of the AF sensor 2, and the photographing lens 1 can be moved to an almost target position during this period.
This method will be described below with reference to FIG. 15.
The result of distance measurement at the time t(n) is obtained at a time tm(n) at which a defocus amount calculation executed after the end of charge accumulation is ended. At the time tm(n), a servo refresh operation based on the distance measurement result is not immediately performed, and only the defocus amount D(n) as the calculation result is stored. At this time, if a previous servo operation is being executed, it is continued, and the servo operation is continuously executed even during the next distance measurement period at the time t(n+1). The servo refresh operation is performed at a time tr(n) immediately after the next distance measurement at the time t(n+1) is ended. More specifically, a refresh operation of a servo target based on a certain distance measurement result is waited until the next distance measurement is ended.
U.S. Ser. No. 894,437 described above adopts a so-called linear count method for simply accumulating the number of monitor pulses from the encoder 6 indicating the moving amount of the photographing lens 1 by the counter, and the count value is inhibited from being reset or preset every time a servo refresh operation is performed. A control system can read out the accumulation value of the counter at any time. More specifically, the accumulation value of the counter corresponds to a certain position, on the optical axis, of the photographing lens 1, and also represents the distance between the photographing lens 1 and the film surface. A difference between the accumulation values of the counter obtained at a certain time interval represents the moving amount of the photographing lens 1 during this interval.
In FIGS. 13 and 14, the distance [mm] between the photographing lens and its imaging surface or the distance [mm] between the photographing lens and the film surface is plotted along the ordinate. However, in the linear count method, the ordinate can be scaled based on the accumulation value of the counter although it is a relative value. The image plane moving amount [mm] per pulse in the optical axis direction can be obtained by multiplying the number of pulses with a coefficient of proportion inherent to the lens. The positions of the photographing lens 1 and its imaging surface are scaled based on the number of pulses from the encoder 6 along the right ordinate in FIG. 15.
The present inventor disclosed a calculation method of an average position of the photographing lens 1 driven during the charge accumulation period of the AF sensor 2 in U.S. Pat. No. 5,153,630. This lens position is calculated by a relative value with respect to the count value. In this method, an average lens position during distance measurement at the time t(n) can be calculated as a pulse count value C(t(n)), and this method has good matching characteristics with the linear count method. With this method, the lens moving amount M(n) between the two distance measurement times t(n) and t(n-1) in equation (1) is given by: EQU M(n)=f(C(t(n))-C(t(n-1))) (7)
where f() is a function for converting the number of pulses into the distance [mm], and as described above, the function can be approximated by multiplying C(t(n))- C(t(n-1)) with a coefficient inherent to the photographing lens.
With this method, the object image plane moving speed S(n) given by equation (2) can always be easily calculated.
In FIG. 15, even when the servo refresh operation based on the distance measurement value D(n) at the time t(n) is executed after the end of distance measurement at the time t(n+1), the photographing lens 1 is moving toward the servo target in the previous servo refresh operation during this interval. If the count value at the servo refresh time tr(n) is C(tr(n)), and the count value corresponding to the average distance measurement position during distance measurement at the time t(n) is C(t(n)), a lens moving amount EC(n) during this interval can be expressed by: EQU EC(n)=C(tr(n))-C(t(n)) (8)
This amount represents the lens moving amount converted into the pulse count value, and a moving amount E(n) in the optical axis direction in units of [mm] is given, using the conversion function f(), by: EQU E(n)=f(EC(n)) (9)
In this manner, the linear count method is very convenient since it can express the lens positions at the respective times according to the same scale as count values.
Of course, even in a conventional method in which the count value is cleared to zero every time a servo refresh operation is executed, the same effect can be realized in principle by adding lens driving amounts of every servo operations by the CPU 4 in a software manner. However, since complicated processing is required, the linear count method is superior to the conventional method in terms of a data processing technique. Upon setting of a servo target in a servo refresh operation, the count value at that time must be temporarily read out, and the servo target must be calculated by adding the number of pulses corresponding to the required lens driving amount to the readout count value. This count value represents a new target driving position of the photographing lens 1.
A servo target position in the servo refresh operation at time tr(n) corresponds to a predicted position Q(t(n+2)) of the object image plane in the next distance measurement at a time t(n+2). This position is ahead of the object image plane position Q(t(n)) at the distance measurement time t(n) by a predicted moving amount P(n) from the time t(n) to the time t(n+2). Since P(n) is obtained by multiplying the moving speed S(n) of the object image plane with a time for two distance measurement periods corresponding to a time {t(n+2)-t(n)}, it is given by: EQU P(n)={t(n+2)-t(n)}.times.S(n) (10)
In this case, it is proper to predict {t(n+2)-t(n)} from the previous distance measurement times, and this time can be calculated under an assumption that, for example, t(n+2)-t(n)=t(n)-t(n-2). Since the lens position at the time t(n) is delayed by the defocus amount D(n) from Q(t(n)), and the moving amount of the photographing lens 1 from the time t(n) to the time tr(n) can be obtained from equation (7), as can be seen from FIG. 15, an amount X(n) to be driven at the time tr(n) is given by: ##EQU1##
As described above, when the servo refresh operation is delayed until the next distance measurement at the time t(n+1) is ended, a time from then until the beginning of the second next distance measurement at the time t(n+2) can be maximally used for driving the lens. If the target lens driving amount can be driven within this period, a defocus amount D(n+2) as the distance measurement result at the time t(n+2) becomes almost zero, as indicated by a curve U1 in FIG. 15. As indicated by a curve U2, when the lens driving operation is not finished until the beginning of the distance measurement at the time t(n+2), this means that the photographing lens 1 is slightly delayed from an object. In this case, the distance measurement at the time t(n+2) is performed to overlap the lens driving operation. The servo operation may be finished during the distance measurement period at the time t(n+2). In any case, the servo operation is refreshed at the time tr(n+1) on the basis of the distance measurement result at the time t(n+1) as in the previous operation. Therefore, with this method, the photographing lens 1 can almost stably trace an object. As long as an object uniformly moves and the distance measurement is precisely performed, the photographing lens 1 will not be largely delayed from the object image plane or will not overshoot the object image plane.
However, in practice, the photographing lens 1 may often overshoot the object image plane due to an irregular motion of an object, a distance measurement error, lens driving control problems, and the like. If this amount is large, the lens driving amount calculated by equation (9) in the servo refresh operation assumes a negative value. More specifically, the photographing lens 1 may exceed the predicted position of the object image plane at the time t(n+2) at the time tr(n) although such a case rarely occurs. In this case, it is preferable to avoid the photographing lens 1 from being driven in the opposite direction in consideration of uniformity of the lens driving operation and the adverse effect of a mechanical backlash of a lens driving mechanism, and to temporarily stop the lens driving operation or to maintain the servo target at that time. As long as an object moves in a single direction, a normal state wherein the object image plane leads the photographing lens 1 is detected again in a later distance measurement, and normal overlap prediction driving control can be presumed.
When equations (5) and (6) are substituted in equation (11), we have: ##EQU2## Furthermore, if t(n+2)-t(n)=t(n)-t(n-2) is assumed, we have: EQU X(n)=2D(n)-D(n-2)+M2(n)-E(n) (13)
Since equation (13) includes no distance measurement time t(n), a calculation can be simplified. However, this calculation is made under a condition that defocus amount detection in each distance measurement is always successful. In practice, a distance measurement operation for an object varies in every distance measurements due to a camera shake or the movement of the object itself. In consideration of occasional distance measurement failures due to such variations, it is advisable to calculate each servo amount X(n) by a method according to equation (11) or (12), which takes the distance measurement time into consideration.
However, in the conventional auto-focus apparatus, every time a defocus amount is calculated based on the distance measurement result, the servo target is refreshed immediately before the beginning of the next distance measurement or after the end of the next distance measurement. For example, when the moving speed of an object is low, the photographing lens is intermittently driven in each servo refresh operation, and the movement of the photographing lens becomes jerky.